//  Inside Microsoft Exchange 2007 Web Services 
//  Chapter 20
//
//  Copyright (c) 2007 David Sterling, Ben Spain, Mark Taylor, Huw Upshall, Michael Mainer.  
//  All rights reserved.
//
using System;
using System.Collections.Generic;
using System.Text;
using ProxyHelpers.EWS;

namespace UsingGetExchangeWebServicesURL
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create the binding (Listing 20-14)
            //
            ExchangeServiceBinding binding = new ExchangeServiceBinding();

            // Retrieve the correct URL for Ken Malcolmson
            //
            binding.Url = EWSHelpers.GetExchangeWebServicesURL(
                            "ken.malcolmson@contoso.com",
                            EWSHelpers.AutodiscoverProtocol.Internal,
                            2 /*redirections allowed*/);
        }
    }
}
